/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout'

const researchTeamRouter =  {
  path: '/researchteam',
  component: Layout,
  redirect: '/researchteam/specialist/list',
  alwaysShow: true, // will always show the root menu
  name: 'Research Team',
  meta: {
    title: '科研队伍管理',
    icon: 'peoples',
  },
  children: [
    {
      path: '/specialist',
      component: () => import('@/views/research-team/specialist/index'),
      redirect: '/researchteam/specialist/list',
      children: [
        {
          path: 'create',
          component: () => import('@/views/research-team/specialist/Create'),
          name: 'CreateSpecialist',
          hidden: true,
          meta: { title: '新增专家',
            permission: "专家信息：创建",
          }
        },
        {
          path: 'edit/:id(\\d+)',
          component: () => import('@/views/research-team/specialist/Edit'),
          name: 'EditSpecialist',
          meta: { title: '编辑专家信息',
            permission: "专家信息：更新",
            noCache: true, activeMenu: '/specialist/list',
          },
          hidden: true
        },
        {
          path: 'view/:id(\\d+)',
          component: () => import('@/views/research-team/specialist/View'),
          name: 'ViewSpecialist',
          meta: { title: '查看专家信息',
            permission: "专家信息：浏览",
            noCache: true, activeMenu: '/specialist/view',
          },
          hidden: true
        },
        {
          path: 'list',
          component: () => import('@/views/research-team/specialist/List'),
          name: 'SpecialistList',
          meta: { title: '专家管理',
            permission: "专家信息：浏览",
          }
        }
      ]
    },
    {
      path: '/researcher',
      component: () => import('@/views/research-team/researcher/index'),
      redirect: '/researchteam/researcher/list',
      children: [
        {
          path: 'create',
          component: () => import('@/views/research-team/researcher/Create'),
          name: 'CreateResearcher',
          hidden: true,
          meta: { title: '新增研究人员',
            permission: "科研人员信息：创建",
          }
        },
        {
          path: 'edit/:id(\\d+)',
          component: () => import('@/views/research-team/researcher/Edit'),
          name: 'EditResearcher',
          meta: { title: '编辑研究人员信息',
            permission: "科研人员信息：更新",
            noCache: true, activeMenu: '/researcher/list',
          },
          hidden: true
        },
        {
          path: 'view/:id(\\d+)',
          component: () => import('@/views/research-team/researcher/View'),
          name: 'ViewResearcher',
          meta: { title: '查看研究人员信息',
            permission: "科研人员信息：浏览",
            noCache: true, activeMenu: '/researcher/view',
          },
          hidden: true
        },
        {
          path: 'list',
          component: () => import('@/views/research-team/researcher/List'),
          name: 'ResearcherList',
          meta: { title: '科研人员管理',
            permission: "科研人员信息：浏览",
          }
        }
      ]
    }
  ]
}

export default researchTeamRouter
